package com.builder;
/**
 * Created by sunxiaoye on 2017/3/16.
 */
public class NintendoSwitch {

    private Integer version;

    private String brandImageUrl;


    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getBrandImageUrl() {
        return brandImageUrl;
    }

    public void setBrandImageUrl(String brandImageUrl) {
        this.brandImageUrl = brandImageUrl;
    }

    private NintendoSwitch(NintendoSwitchBuilder builder){

        this.version=builder.version;
        this.brandImageUrl=builder.brandImageUrl;
    }

    public static class NintendoSwitchBuilder{

        private Integer version;

        private String brandImageUrl;



       public NintendoSwitchBuilder version(Integer version){
            this.version=version;
            return this;
        }

       public NintendoSwitchBuilder url(String url){
            brandImageUrl=url;
            return this;
        }

       public NintendoSwitch build(){
            return new NintendoSwitch(this);
        }

    }

    public static void main(String[] args) {
        NintendoSwitch ns = new NintendoSwitchBuilder().version(1).url("http://erp.jd.com").build();

        System.out.println(ns.brandImageUrl);
        System.out.println(ns.version);
    }
}
